package com.kexun.common.enums;

public enum OrderStatus {
    待支付(0, "待支付"),
    待处理(1, "待处理"),
    处理中(2, "处理中"),
    处理完成(3, "处理完成"),
    ;

    private int status;

    private String name;

    OrderStatus(int status, String name) {
        this.status = status;
        this.name = name;
    }

    public static String getName(int status) {
        for (OrderStatus c : OrderStatus.values()) {
            if (c.getStatus() == status) {
                return c.name;
            }
        }
        return null;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
